There has been known a thermal printer that detects a mark on a sheet and positions the sheet (see Japanese Laid-open Patent Publication No. 2012-30435). In the thermal printer, a threshold value for mark detection is updated in consideration of discoloration of the sheet. There has been known a thermal printer which updates a threshold value for detecting a positioning mark on the paper according to the situation of light from the outside (see Japanese Laid-open Patent Publication No. 2011-178147).